package com.wease.im.server.servlet;

import com.weasel.helper.ClassPathFileReader;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created by Dylan on 2015/9/28.
 */
public class WebSocketIMServlet extends HttpServlet {



    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        response.setContentType("text/html;charset=utf-8");
        response.setStatus(HttpServletResponse.SC_OK);

        String html = ClassPathFileReader.readToString("/websocket_im.html");
        response.getWriter().println(html);
        response.getWriter().flush();
        response.getWriter().close();

    }
}
